package com.suli.account.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.suli.account.enums.Sex;
import com.suli.account.enums.Status;
import lombok.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author SuLi
 * @since 2022-03-19
 */

@Getter
@Setter
@TableName("user")
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableId(value = "user_id",type = IdType.ASSIGN_ID)
    private String userId;

    /**
     * 用户名
     */
    @TableField("user_name")
    private String userName;

    /**
     * 用户密码
     */
    @TableField("user_password")
    private String userPassword;

    /**
     * 用户头像
     */
    @TableField(value = "user_avatar",fill = FieldFill.INSERT)
    private String userAvatar;

    /**
     * 用户性别
     */
    @TableField(value = "user_gender",fill = FieldFill.INSERT)
    private Sex userGender;

    /**
     * 用户邮箱
     */
    @TableField("user_email")
    private String userEmail;

    /**
     * 冻结
     */
    @TableField(value = "user_freeze",fill = FieldFill.INSERT)
    private Status userFreeze;

    /**
     * 注册时间
     */
    @TableField(value = "register_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date registerTime;
}
